package org.BooCrack.bookstore.pay;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.BooCrack.bookstore.model.entity.Orders;

import java.io.IOException;

@Service
public class Ipay extends AbstractPay{



    @Override
    public void prepareAndPay(@Autowired PayContext payContext) throws IOException {


        Orders order = payContext.getOrders();

        System.out.println("订单号为：" + order.getOrderId() + " 的订单准备支付...");

        System.out.println("订单号为：" + order.getOrderId() + " 的订单完成支付...");

    }

    @Override
    public void afterPay(PayContext payContext) {

        Orders order = payContext.getOrders();

        System.out.println("订单号为：" + order.getOrderId() + " 的订单支付结束...");


    }
}
